package com.kongyz;

import com.kongyz.command.BuyStock;
import com.kongyz.command.SellStock;
import com.kongyz.command.Stock;
import com.kongyz.invoker.Broker;

/**
 * @author kongyz
 * @date 2018/7/2 20:49
 * @Description:
 */
public class Demo {
    public static void main(String[] args) {
        Stock abcStock=new Stock();
        BuyStock buyStock=new BuyStock(abcStock);
        SellStock sellStock=new SellStock(abcStock);

        Broker broker=new Broker();
        broker.takeOrder(buyStock);
        broker.takeOrder(sellStock);

        broker.placeOrders();
    }
}
